import React from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';

export default function AxPageHeaderWrapper(props) {
  const { title, children, onBack, ...rest } = props;
  return (
    <PageHeaderWrapper
      title={title || false}
      onBack={onBack ? () => window.history.back() : false}
      {...rest}
    >
      {children}
      {/* {props.items.map((i, idx) => (<div key={idx}>{i}</div>))} */}
    </PageHeaderWrapper>
  );
}
